import { createRouter, createWebHistory } from "vue-router";
import HomeView from "../views/HomeView.vue";
import ShoppingCartView from "@/views/ShoppingCartView.vue";
import MyView from "@/views/MyView.vue";
import ListView from "@/views/ListView.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "home",
      component: HomeView,
      meta: {
        isShowTabbar: true,
      },
    },
    {
      path: "/list",
      name: "list",
      component: ListView,
      meta: {
        isShowTabbar: true,
      },
    },
    {
      path: "/shoppingCart",
      name: "shoppingCart",
      component: ShoppingCartView,
      meta: {
        isShowTabbar: true,
      },
    },
    {
      path: "/my",
      name: "my",
      component: MyView,
      meta: {
        isShowTabbar: true,
      },
    },
    {
      path: "/register",
      name: "register",
      component: () => import("@/views/RegisterView.vue"),
      meta: {
        isShowTabbar: false,
      },
    },
    {
      path: "/login",
      name: "login",
      component: () => import("@/views/LoginView.vue"),
      meta: {
        isShowTabbar: false,
      },
    },
  ],
});

export default router;
